package com.nuanshui.heatedloan.entity.cms.security;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.nuanshui.heatedloan.entity.IdEntity;


/**
 * 用户与角色的中间表
 */
@Entity
@Table(name = "cms_security_user_role")
public class UserRoleVO extends IdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 值越小，优先级越高，不过暂时还没什么用哦
	 */
	private Integer priority = 99;
	
	@Transient
	private RoleVO role;

	private Long userId;
	
	private Long roleId;
	
	/**
	 * 返回 role 的值
	 * 
	 * @return role
	 */
	public RoleVO getRole() {
		return role;
	}

	/**
	 * 设置 role 的值
	 * 
	 * @param role
	 */
	public void setRole(final RoleVO role) {
		this.role = role;
	}


	/**
	 * 返回 priority 的值
	 * 
	 * @return priority
	 */
	public Integer getPriority() {
		return priority;
	}

	/**
	 * 设置 priority 的值
	 * 
	 * @param priority
	 */
	public void setPriority(final Integer priority) {
		this.priority = priority;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	
}
